package org.example.handler;


import org.example.Service.GameServerConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class TestController {

    @Autowired
    GameServerConfigService gameServerConfigService;

    @GetMapping("/test")
    public String test() {
        return "hello";
    }


    @GetMapping("/game-server-config")
    public String getGameServerConfig() {
        // 调用服务类读取配置文件内容
        return gameServerConfigService.getConfigAsString();
    }
}
